{% extends "site_base.html" %}
{% load i18n %}

{% block body %}
<a href={% url s_create_event %}>{% trans "Add" %}</a>
    <h1>
        <a href="{% url s_calendar_date calendar.slug month.prev_month.year month.prev_month.month %}"> &lt; </a>
	{{month.start|date:_("YEAR_MONTH_FORMAT")}}
        <a href="{% url s_calendar_date calendar.slug month.next_month.year month.next_month.month %}"> &gt; </a></h1>
    <table style="border: black solid 1px">
    {% if day_names %}
        <tr>
        {% for day_name in day_names %}
	<th align="center">{{ day_name }}</th>
        {% endfor %}
        </tr>
    {% endif %}
    {% for week in month.get_weeks %}
        <tr>
        {% for day in week.get_days %}
             <td style="border: black solid 1px;
                        min-width: 125px;
                        width: 125px;
                        height: 125px;
                        min-height: 125px;
                        vertical-align: top;
                        padding-left: 10px
                        ">
                 <h2>{{day.start.day}}</h2>
                 <ul>
                    {% for occurrence_partial in day.get_occurrence_partials %}
                        <li>{{ occurrence_partial.occurrence.start.time }} - {{ occurrence_partial.occurrence.end.time }} : <a href="{{occurrence_partial.occurrence.event.get_absolute_url}}">
                            {{ occurrence_partial.occurrence.event.title }}</a>
		    {% ifequal occurrence_partial.class 0 %}({% trans "Starts" %}){% endifequal %}
		    {% ifequal occurrence_partial.class 2 %}({% trans "Continues" %}){% endifequal %}
		    {% ifequal occurrence_partial.class 3 %}({% trans "Ends" %}){% endifequal %}
                        </li>
                    {% endfor %}
                </ul>
             </td>
        {% endfor %}
        </tr>
    {% endfor %}
    </table>
{% endblock %}
